﻿<%@ Page Title="Rediger Profil" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="editProfile.aspx.cs" Inherits="UCNKompetenceBors.User.editProfile" %>

<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <script language="javascript">
        function Hide() {
            document.getElementById('<%=lblConfirmUpdatedUser.ClientID %>').style.display = 'none';
            return false;
        }
    </script>

    <div id="profileWrapper" class="contentSmallWrapper floatLeft">
        <div id="profileMenuWrapper" class="submenuBox floatLeft">
            <div class="subMenuBoxContent">
                <ul>
                    <li>
                        <asp:HyperLink ID="hyLinkProfile" runat="server" Text="Profil"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkEditProfile" runat="server" Text="Rediger Profil" ForeColor="#FF9933"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkChangePassword" runat="server" Text="Ændre Password"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkSettings" runat="server" Text="Instillinger"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkSale" runat="server" Text="Mine salg"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkPurchases" runat="server" Text="Mine køb"></asp:HyperLink></li>
                </ul>
            </div>
        </div>

        <div id="profileContentWrapper" class="contentBoxSmall floatLeft">
            <div id="profileContent" class="floatLeft">
                <asp:Panel ID="panCreateUserForm" runat="server">
                    <div class="inputFormSmall floatLeft">
                        <div class="inputFormSmallLeft floatLeft">
                            <div class="inputFormSmallRow floatLeft">
                                <asp:Label ID="lblsignupFormHeader" runat="server" Text="Edit Profile information" CssClass="contentTitle"></asp:Label>
                            </div>

                            <div class="inputFormSmallRow floatLeft">
                                <div class="inputFormSmallCellLeft floatLeft">
                                    <asp:Label ID="lblEmail" runat="server" Text="Email: " AssociatedControlID="txtEmail"></asp:Label>
                                </div>
                                <div class="inputFormSmallCellRight floatLeft">
                                    <asp:TextBox ID="txtEmail" runat="server" Width="300px" MaxLength="100"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvalEmail" runat="server" ErrorMessage="Email is required" ToolTip="Email is required" Text="*" ControlToValidate="txtEmail" ValidationGroup="UpdateUserForm" Display="Dynamic" ForeColor="Red"></asp:RequiredFieldValidator>
                                    <asp:RegularExpressionValidator ID="regexvalEmail" runat="server" ErrorMessage="The e-mail entered is invalid." ValidationExpression="^.+@[^\.].*\.[a-z]{2,}$" ControlToValidate="txtEmail" ValidationGroup="UpdateUserForm" ToolTip="The e-mail entered is invalid." Display="Dynamic" Text="*" ForeColor="Red"></asp:RegularExpressionValidator>
                                </div>
                            </div>

                            <div class="inputFormSmallRow floatLeft">
                                <div class="inputFormSmallCellLeft floatLeft">
                                    <asp:Label ID="lblFirstName" runat="server" Text="First Name: " AssociatedControlID="txtFirstName"></asp:Label>
                                </div>
                                <div class="inputFormSmallCellRight floatLeft">
                                    <asp:TextBox ID="txtFirstName" runat="server" Width="300px" MaxLength="50"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvalFirstName" runat="server" ErrorMessage="First Name is required" ToolTip="First Name is required" Text="*" ControlToValidate="txtFirstName" ValidationGroup="UpdateUserForm" ForeColor="Red"></asp:RequiredFieldValidator>
                                </div>
                            </div>

                            <div class="inputFormSmallRow floatLeft">
                                <div class="inputFormSmallCellLeft floatLeft">
                                    <asp:Label ID="lblLastName" runat="server" Text="Last Name: " AssociatedControlID="txtLastName"></asp:Label>
                                </div>
                                <div class="inputFormSmallCellRight floatLeft">
                                    <asp:TextBox ID="txtLastName" runat="server" Width="300px" MaxLength="50"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvalLastName" runat="server" ErrorMessage="Last Name is required" ToolTip="Last Name is required" Text="*" ControlToValidate="txtLastName" ValidationGroup="UpdateUserForm" ForeColor="Red"></asp:RequiredFieldValidator>
                                </div>
                            </div>

                            <div class="inputFormSmallRow floatLeft">
                                <div class="inputFormSmallCellLeft floatLeft">
                                    <asp:Label ID="lblPhone" runat="server" Text="Phone (Optional): " AssociatedControlID="txtPhone"></asp:Label>
                                </div>
                                <div class="inputFormSmallCellRight floatLeft">
                                    <asp:TextBox ID="txtPhone" runat="server" Width="300px" MaxLength="15"></asp:TextBox>
                                    <asp:RegularExpressionValidator ID="regexvalPhone" runat="server" ErrorMessage="The specified phone number is invalid" ToolTip="The specified phone number is invalid" ValidationGroup="UpdateUserForm" ValidationExpression="^((\(?\+45\)?)?)(\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2})$" ControlToValidate="txtPhone" Text="*" ForeColor="Red" Display="Dynamic"></asp:RegularExpressionValidator>
                                </div>
                            </div>

                            <div class="inputFormSmallRow floatLeft">
                                <div class="floatLeft">
                                    <asp:Label ID="lblBiography" runat="server" Text="Bio (Optional):"></asp:Label>
                                    <br />
                                    <br />
                                    <CKEditor:CKEditorControl ID="ckeditorBiography" BasePath="/ckeditor/" runat="server"></CKEditor:CKEditorControl>
                                </div>
                            </div>

                            <div class="inputFormSmallRow floatLeft">
                                <div class="floatLeft">
                                    <asp:Label ID="lblConfirmUpdatedUser" runat="server"></asp:Label>
                                </div>
                                <div class="inputFormButtonMargin floatRight">
                                    <asp:Button ID="btnUpdateUser" runat="server" Text="Update User" CssClass="button" OnClientClick="Hide()" OnClick="btnUpdateUser_Click" ValidationGroup="UpdateUserForm" />
                                </div>
                            </div>
                        </div>

                        <div class="inputFormSmallRight floatRight">
                            <asp:ValidationSummary ID="valsumSignupForm" runat="server" ForeColor="Red" HeaderText="The following errors were detected:" ValidationGroup="UpdateUserForm" />
                        </div>
                    </div>
                </asp:Panel>
            </div>
        </div>
    </div>
</asp:Content>
